/**
 * 
 */
package TelitPy;

import COMM232.DriverListener;
import COMM232.DriverSerial;

/**
 * @author Administrador
 *
 */
public class Receiver implements DriverListener
{

	private DriverSerial driver;
	
	private TimeOut timeOut;
	
	public Receiver(DriverSerial driver, TimeOut timeOut)
	{
		this.driver = driver;
		this.timeOut = timeOut;
	}

	public void isrSerial()
	{
		timeOut.stop();
		char c[] = driver.getBytes();
		for(int i = 0; i < driver.getIdx(); i++)
		{
				System.out.print(c[i]);
		}//end for
		driver.flushBuffer();
	}//end isrSerial()----------------------------------------------------------
	
}
